<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../../lib/respond.min.js?rev=@@hash"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="../../../lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../../ht-css/Project.css"/>
    <link rel="stylesheet" type="text/css" href="../../../lib/Validform/5.3.2/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="../../../lib/DD_belatedPNG_0.0.8a-min.js?rev=@@hash"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../../ht-css/style-q.css"/>
    <title></title>
</head>
<body>
<form class="ml-20 mt-20 mb-20 mr-20" id="form-member-add">
    <span>说明：</span>
    <div  class="formControls mb-20">
        <textarea class="textarea radius" name="reason" id="reason" cols="30" rows="10" datatype="*1-500" onKeyUp="value=value.replace(/\s+/g,'')" ignore="ignore"></textarea>
    </div>
    <span class="Validform_checktip"></span>
    <div style="text-align: center">
        <a onclick="cancelBtn()" id="cancelBtn" class="btn btn-secondary radius size-S ml-20">取消</a>
        <input id="bottm" type="submit" class="btn btn-secondary radius size-S ml-20" value="确认">
    </div>
</form>
</body>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script>
<!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<!--表单验证-->
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/jquery.validate.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/validate-methods.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/jquery.validation/1.14.0/messages_zh.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script src="../../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../../ht-js/verifyToken.js?rev=@@hash"></script>
<script src="../../../ht-js/Project.js?rev=@@hash"></script>
<script>
    $(function(){
        $("#form-member-add").Validform({
            tiptype:2,
            callback:function(form){
                sureBtn()
                return false;
            }
        });
    })
    var maintainOrderId = sessionStorage.getItem("maintainOrderId");
    var maintain_id = sessionStorage.getItem("maintainId");
    var loginData = JSON.parse(web.readCookie("loginData"));
    var isIng = false;
    function sureBtn() {
        if(isIng){
            layer.msg('请求已提交，请勿重复点击！');
            return false;
        }
        isIng = true;
        $.ajax({
            contentType:"application/json",
            type: "POST",
            url: root.orderInter.order_maintainunaudit_auditReject,
            cache: false,  //禁用缓存
            dataType: "json",
            data: JSON.stringify({
                "maintain_id":maintain_id,
                maintain_remark:$("#reason").val(),
                "operate_userid":loginData.user.user_ID,
                "operate_username":loginData.user.name
             }),
            success: function (result) {
                // console.log(parent);
                parent.location.reload();
                parent.layer.closeAll();
                // var index =  parent.location.reload();
                // parent.layer.close(index);
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                isIng = false;
            }
        });
    }
    function cancelBtn() {
        parent.layer.closeAll();
    }
</script>
</html>